package adapter.classadapter.phone.impl;

import adapter.classadapter.Voltage5V;
import adapter.classadapter.phone.Phone;

/**
 * @author : DuJiabao
 * @Date : 2021/3/3 9:43
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class Iphone implements Phone {
  @Override
  public void charge(Voltage5V voltage5V) {
    if(voltage5V.output5V() != 5) throw new RuntimeException("无法充电");
    System.out.println("充电中");
  }
}
